
public class ToCsharpLibrary {

	
	
	
	ToCsharpLibrary()
	{
		
		
	}
	
	String getCsharpVersion(String libraryName)
	{
		
		
		String className = "";
		
		//================================================
		/***  Converting the JAVA.IO PACKAGES  ***/
		
		/*
		 *  This Section of code takes a class from the java.io
		 *  package and Find the appropriate class library in C#
		 */
		
		//====================================================
		
		
		if(libraryName.startsWith("java.io"))
		{
			
			/** Processing yet to be done to get
			 *  the exact class name
			 */
			
			className = libraryName;
			
			if(className.equals("BufferedInputStream"))
				return "System.IO.BufferedStream";

			else if(className.equals("BufferedOutputStream"))
				return "System.IO.BufferedStream";

			else if(className.equals("BufferedReader"))
				return "System.IO.StreamReader";

			else if(className.equals("BufferedWriter"))
				return "System.IO.StreamWriter";
			
			else if(className.equals("ByteArrayInputStream"))
					return "System.IO.MemoryStream";		
			
			else if(className.equals("ByteArrayOutputStream"))
					return "System.IO.MemoryStream";		

			else if(className.equals("CharArrayReader"))
					return "System.IO.StreamReader";		

			else if(className.equals("CharArrayWriter"))
					return "System.IO.StreamReader";
			
			

			else if(className.equals("DataInputStream"))
					return "System.IO.BinaryReader";

			else if(className.equals("DataOutputStream"))
					return "System.IO.BinaryWriter";

			else if(className.equals("File"))
					return "System.IO.File";

			
			
			
			else if(className.equals("FileInputStream"))
				return "System.IO.FileStream";

			else if(className.equals("FileOutputStream"))
				return "System.IO.FileStream";

		

			else if(className.equals("FileReader"))
				return "System.IO.StreamReader";
			

			else if(className.equals("FileWriter"))
				return "System.IO.StreamReader";


			
			else if(className.equals("InputStream"))
					return "System.IO.Stream";

			
			
			else if(className.equals("OutputStream"))
					return "System.IO.Stream";

			

			else if(className.equals("PrintStream"))
					return "System.IO.StreamWriter";

			else if(className.equals("PrintWriter"))
					return "System.IO.StreamWriter";

			else if(className.equals("PushbackInputStream"))
					return "System.IO.StreamReader";

			else if(className.equals("PushbackReader"))
					return "System.IO.StreamReader";

			else if(className.equals("RandomAccessFile"))
					return "System.IO.FileStream";

			

			else if(className.equals("StringBufferInputStream"))
					return "System.IO.StringReader";

			else if(className.equals("StringReader"))
					return "System.IO.StringReader";

			else if(className.equals("StringWriter"))
					return "System.IO.StringWriter";

			

			
			/* NOT AVAILABLE IN C# version
			 * ============================
			
			InputStreamReader, LineNumberInputStream
			
			LineNumberReader , FileDescriptor, FilePermission 
			
			ObjectInputStream.GetField,ObjectOutputStream.PutField,
			
			ObjectStreamClass,ObjectStreamField,StreamTokenizer
			
			OutputStreamWriter, PipedInputStream,

			PipedOutputStream, PipedReader, PipedWriter,
			
			FilterInputStream , FilterOutputStream

			FilterReader, FilterWriter ,Reader,Writer

			SequenceInputStream ,SerializablePermission

			
			 
			 */
			
			
			/**************************************/
			
			/** No Direct counterpart, May be indirect*/
			

			/** ObjectInputStream,ObjectOutputStream */

			
			
		}	
		

		//================================================
		/***  Converting the JAVA.LANG PACKAGES  ***/
		
		/*
		 *  This Section of code takes a class from the java.lang
		 *  package and Find the appropriate class library in C#
		 */
		
		//====================================================
		
		
		if(libraryName.startsWith("java.lang"))
		{
		
		
			if(className.equals("Boolean"))
				return "System.Boolean";
			
			else if(className.equals("Byte"))
				return "System.Byte";
				
			else if(className.equals("Character"))
				return "System.Char";
				
			else if(className.equals("Class"))
				return "System.Type";
		
			else if(className.equals("Double"))
				return "System.Double";		
									
			else if(className.equals("Float"))
				return "System.Single";
						
			else if(className.equals("Integer"))
				return "System.Int32";
							
			else if(className.equals("Long"))
				return "System.Int64";	
					
					
			else if(className.equals("Math"))
				return "System.Math";		
										
		    else if(className.equals("Object"))
		    	return "System.Object";	
			
		    else if(className.equals("Process"))
		    	return "System.Diagonistic.Process";

		    else if(className.equals("Runtime"))
		    	return "System.Diagonistic.Process";
		    
		    
		    else if(className.equals("Short"))
		    	return "System.Int16";	
		    							
		    else if(className.equals("StrictMath"))
		    	return "System.Math";	
		    					
		    else if(className.equals("String"))
		    	return "System.String";	
		
		    else if(className.equals("StringBuffer"))
		    	return "System.Text.StringBuilder";	
						
		    else if(className.equals("Thread"))
		    	return "System.Threading.Thread";
		    		    							
		    else if(className.equals("ThreadLocal"))	
		    	return "System.LocalDatastoreSlot";
		  
		    else if(className.equals("Throwable"))
		    	return "System.Exception";
			
			// The Reflection Package
			
		    else if(className.equals("AccessibleObject"))
		    	return "System.Reflection.MemberInfo";
		    	
		    else if(className.equals("Array"))
		    	return "System.Array";
		    	
		    else if(className.equals("Constructor"))
		    	return "System.Reflection.ConstructorInfo";
		    	
		    else if(className.equals("Field"))
		    	return "System.Reflection.FieldInfo";
			    	
			else if(className.equals("Method"))
				return "System.Reflection.MethodInfo";
				    
				    	
		    else if(className.equals("Modifier"))
		    	return "System.Reflection.MethodAttributes";
		    
		    	
		    else if(className.equals("ReflectPermission"))
		    	return "System.Security.Permissions.ReflectionPermission";
		}
		
		
		
		//================================================
		/***  Converting the JAVA.UTIL PACKAGES  ***/
		
		/*
		 *  This Section of code takes a class from the java.lang
		 *  package and Find the appropriate class library in C#
		 */
		
		//====================================================
		
		if(libraryName.startsWith("java.util"))
		{
			
			if(className.equals("AbstractCollection"))
				return "System.Collections.CollectionsBase";
				
			
			else if(className.equals("ArraysList"))
				return "System.Collections.ArrayList";
			
			else if(className.equals("Arrays"))
				return "System.Array";
			
			else if(className.equals("BitSet"))
				return "System.Collections.BitArray";
			
			else if(className.equals("Calendar"))
				return "System.Globalization.Calendar";
			
			
			else if(className.equals("Currency"))
				return "System.Globalization.RegionInfo";
			
			else if(className.equals("Date"))
				return "System.DateTime";
			
			else if(className.equals("Dictionary"))
				return "System.Collections.DictionaryBase";
			
			else if(className.equals("EventObject"))
				return "System.EventArgs";
			
		
			else if(className.equals("GregorianCalendar"))
				return "System.Globalization.GregorianCalendar";
			
			
			else if(className.equals("HashMap"))
				return "System.Collections.Hashtable";
			
			
			else if(className.equals("Hashtable"))
				return "System.Collections.Hashtable";
			
			
			else if(className.equals("ListResourceBundle"))
				return "System.Resources.ResourceManager";
			
			
			else if(className.equals("Locale"))
				return "System.Globalization.CultureInfo";
			
			
			else if(className.equals("Random"))
				return "System.Random";
			
			
			else if(className.equals("ResourceBundle"))
				return "System.Resources.ResourceSet";
			
			
			else if(className.equals("SimpleTimeZone"))
				return "System.DateTime";
			
			
			else if(className.equals("Stack"))
				return "System.Collections.Stack";
			
			
			else if(className.equals("Timer"))
				return "System.Threading.Timer";
			
			
			else if(className.equals("TimerTask"))
				return "System.Threading.TimerCallback";
			
			
			
			else if(className.equals("TimeZone"))
				return "System.DateTime";
			
		
			else if(className.equals("Vector"))
				return "System.Collections.ArrayList";
			
			else if(className.equals("TreeSet"))
				return "System.Collections.SortedList";
		}
		
		
		
		
		return null;
	}
	
}
